package com.darren.archive.service;

import com.darren.archive.entity.SysFunction;
import com.darren.framework.service.GenericService;

import java.util.List;


/**
 * <pre>
 * *********************************************
 * Copyright DARREN
 * All rights reserved.
 * Description: TODO(description)
 * HISTORY:
 * *********************************************
 *  Version		Date		Author	   		Desc
 *   v1.0       2018-04-11  Darren Zhou    Create
 *
 * *********************************************
 * </pre>
 */
public interface SysFunctionService extends GenericService<SysFunction, Long> {

    List<SysFunction> getFunctionTree();

    List<SysFunction> getFunctionList(String functionName);

    List<SysFunction> getAllFunctions();

    SysFunction save(SysFunction entity);

    SysFunction update(SysFunction entity);

    void delete(SysFunction entity);

    void deleteById(Long id);

    SysFunction findById(Long id);

    /**
     * 根据用户id，获取其所拥有的功能列表
     *
     * @param userId
     * @return
     */
    List<SysFunction> getEnableSysFunctionByUserId(Long userId);

    SysFunction saveEnable(SysFunction record);

}
